<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Online Video Library</title>
</head>
<body>
<script type="text/javascript">
function validateForm()
{
	if(document.getElementById("emailId").value == "")
	{
		document.getElementById("errorMessage").innerText= "Email ID cannot be blank";
		return false;
	}
	if(document.getElementById("password1").value == "")
	{
		document.getElementById("errorMessage").innerText = "Password cannot be blank";
		return false;
	}	
}
</script>
<form name="welcome" method="POST" action="SignInServlet">

<% 
	String emailId = (String)request.getAttribute("emailId");
	if(emailId == null)
	{
		emailId ="";
	}
%>
<table width="100%" height="100%" align="left">
<tr height="100%">
<td width="60%">
<div align="justify">
<img alt="" src="Images/welcome.png" align="top" width="100%">
</div>
</td>
<td width="25%" align="justify">
<div align="center" style="background-color: rgb(254,252,180);">	
	<font size="5"><b> Member Sign In </b></font>
	<% String email = (String)request.getAttribute("emailException");
						if(email != null)
						{
							%>
							<br> <label style="size: 32; color: red"><%=email%></label> 
					   <%} %>
	<table align="left" style="background-color: rgb(254,252,180);" width="100%">
		<tr>
		<td valign="top" align="left" style="font-family: Times New Roman;">
		<label><b>Email </b></label>
		</td>
		<td valign="top" align="left" style="font-family: Times New Roman;">
		<input id="emailId" type="text" name="emailId" value = "<%= emailId %>" size="35%" maxlength="30"
			style="background-color: white;">
		</td>
		</tr>
		<tr>
		<td valign="top" align="left" style="font-family: Times New Roman;">
		<label><b>Password</b></label>
		</td>
		<td valign="top" align="left" style="font-family: Times New Roman;">
		<input id="password1" type="password" name="password1" value = "" size="35%" maxlength="20"
			style="background-color: white;">
		</td>
		</tr>
		<tr>
		<td/>
		<td>
		<input type="submit" value="Sign in" name="sub_button" align="bottom">
		</td>
		</tr>
		<tr>
		<td/>
		<td>
		<p><font size="3">Not a member ?
		<a href="createAccount.jsp">Click Here</a></font>
		</p>
		</td>
		</tr>
	</table>
	</div>
</td>
</tr>
</table>
</form>
</body>
</html>
